#include <stdio.h>
#include <libusb-1.0/libusb.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#include <string.h>
#include <pthread.h>
#include <stdlib.h>


typedef unsigned char u8;
typedef unsigned int u32;
typedef double d32;


struct package{
	u8 header;
	u8 kind;
	u8 length_07;
	u8 length_815;
	u8 length_1623;
	u8 length_2431;
	u8 *gprmc;
	u8 tail1;
	u8 tail2;
};

void main(){

	FILE *fr;
	fr = fopen("test.txt","rb");
	if(!fr){
		printf("error\n");
		exit(-1);
	}
	struct package *ppk = (struct package *)malloc(sizeof(struct package));
	
	fread(ppk,sizeof(ppk),1,fr);
	printf("ppk %s\n",ppk->gprmc);
	free(ppk);
	fclose(fr);



}

